import request from '@/utils/request';


// 算法
// 查询
export function getList(query) {
    return request({
        url: '/analysis/list',
        method: 'post',
        data: query
    });
}
// 新增
export function addAnalysis(param) {
    return request({
        url: '/analysis/add',
        method: 'post',
        data: param
    });
}
// 修改
export function updateAnalysis(param) {
    return request({
        url: '/analysis/update',
        method: 'post',
        data: param
    });
}
// 删除
export function deleteAnalysis(param) {
    return request({
        url: `/analysis/${param?.id}`,
        method: 'delete'
    });
}

// 算子
// 查询
export function getOperatorList(query) {
    return request({
        url: '/operator/list',
        method: 'post',
        data: query
    });
}
// 新增
export function addOperator(param) {
    return request({
        url: '/operator/add',
        method: 'post',
        data: param
    });
}
// 修改
export function updateOperator(param) {
    return request({
        url: '/operator/update',
        method: 'post',
        data: param
    });
}
// 删除
export function deleteOperator(param) {
    return request({
        url: `/operator/${param?.id}`,
        method: 'delete'
    });
}
// 参数预览查询
export function getPrameterList(param) {
    return request({
        url: ``,
        method: 'get'
    });
}
// 获取关联上下游参数
export function getOperatorRelatedMap(param) {
    return request({
        url: `/parameter/config/related/operator/map`,
        method: 'get',
        params: param
    });
}
// 删除上下游参数配置
export function deleteOperatorMapParameter(param) {
    return request({
        url: `/operator/parameter/map/delete`,
        method: 'post',
        data: param
    });
}
//获取算法编排信息
export function getAlgorithmArrangement(param) {
    return request({
        url: `/analysis/config/getAlgorithmArrangement`,
        method: 'get',
        params: param
    });
}
// 获取算子详情
export function getOperatorInfo(param) {
    return request({
        url: `/operator/detail`,
        method: 'get',
        params: param
    });
}
// 获取全部算子参数
export function getOperatorParameterConfig(param) {
    return request({
        url: `/parameter/config/operator/list`,
        method: 'get',
        params: param
    });
}
//获取当前算子对应的上游算子以及上游算子的输出参数列表
export function getOperatorOutputParameter(param) {
    return request({
        url: `/operator/parameter/output/list`,
        method: 'get',
        params: param
    });
}
// 新增上下游关系
export function saveOperatorMapParameter(param) {
    return request({
        url: `/operator/parameter/map/save`,
        method: 'post',
        data: param
    });
}
// 编排保存接口
export function algorithmArrangementSave(param) {
    return request({
        url: `/analysis/config/algorithmArrangementSave`,
        method: 'post',
        data: param
    });
}
// 更新上下游关系
export function updateOperatorMapParameter(param) {
    return request({
        url: `/operator/parameter/map/update`,
        method: 'post',
        data: param
    });
}
// 查询字典信息
export function getDictValues(param) {
    return request({
        url: `/system/dict/data/getByTypeAndLabel`,
        method: 'get',
        params: param
    });
}








